require('../../less/controls/toggle_switch.less');
var React = require('react');

module.exports = React.createClass({
	displayName:'ToggleSwitch',
	getInitialState:function(){
		return {

		}
	},
	componentDidMount:function(){

	},
	__onChange: function (event) {
		this.props.onChange && this.props.onChange(event.target.checked, event);
	},
	render:function(){
		var _uuid = 'c_toggle_switch_input_' + (new Date()).getTime();
		return (
			<div className="c-toggle-switch">
				<input id={_uuid} type="checkbox" hidden="" onChange={this.__onChange} />
				<label htmlFor={_uuid} className="ts-helper"></label>
			</div>
		);
	}
});
